package com.doupi.partner.rpc.dto;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;

/**
 * 补充数据
 * 
 * @author Alvin Wang
 * @version 1.0.0 @ 2017-05-11
 */
public class ExtraData implements Serializable {
	/**
	 * 数据名称
	 */
	private String name;

	/**
	 * 数据key
	 */
	private String key;

	/**
	 * 数据值
	 */
	private Object value;

	public ExtraData(String name, String key, Object value) {
		this.name = name;
		this.key = key;
		this.value = value;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}

	@Override
	public boolean equals(Object that) {
		return EqualsBuilder.reflectionEquals(this, that);
	}

	@Override
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
	}
}
